var now= new Date(); 
var year=now.getYear(); 
var month=now.getMonth()+1; 
var day=now.getDate(); 
var hour=now.getHours(); 
var minute=now.getMinutes(); 
var second=now.getSeconds(); 
if(day<10)day="0"+day;
if(month<10)month="0"+month;
if(hour<10)hour="0"+hour;
if(minute<10)minute="0"+minute;
if(second<10)second="0"+second;